#!/usr/bin/env python

PACKAGE="realsense_camera"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#             Name                                     Type    Level Description                     Default    Min     Max
gen.add("enable_depth",                                bool_t, 0,    "Enable Depth",                 True)
gen.add("color_backlight_compensation",                int_t,  0,    "Backlight Compensation",       0,         0,      4)
gen.add("color_brightness",                            int_t,  0,    "Brightness",                   0,         -64,    64)
gen.add("color_contrast",                              int_t,  0,    "Contrast",                     50,        0,      100)
gen.add("color_gain",                                  int_t,  0,    "Gain",                         64,        0,      128)
gen.add("color_gamma",                                 int_t,  0,    "Gamma",                        300,       100,    500)
gen.add("color_hue",                                   int_t,  0,    "Hue",                          0,         -180,   180)
gen.add("color_saturation",                            int_t,  0,    "Saturation",                   64,        0,      100)
gen.add("color_sharpness",                             int_t,  0,    "Sharpness",                    50,        0,      100)

# Must be set only if color_enable_auto_white_balance is disabled
gen.add("color_white_balance",                         int_t,  0,    "White Balance",                4600,      2800,   6500)

gen.add("color_enable_auto_white_balance",             int_t,  0,    "Enable Auto White Balance",    1,         0,      1)

# Must be set only if color_enable_auto_exposure is disabled
gen.add("color_exposure",                              int_t,  0,    "Exposure",                     156,       39,     10000)

gen.add("color_enable_auto_exposure",                  int_t,  0,    "Enable Auto Exposure",         1,         0,      1)

# Options common with F200
gen.add("f200_laser_power",                            int_t,  0,    "Laser Power",                  16,        0,      16)
gen.add("f200_accuracy",                               int_t,  0,    "Accuracy",                     1,         1,      3)
gen.add("f200_motion_range",                           int_t,  0,    "Motion Range",                 9,         0,      100)
gen.add("f200_filter_option",                          int_t,  0,    "Filter Option",                5,         0,      7)
gen.add("f200_confidence_threshold",                   int_t,  0,    "Confidence Threshold",         3,         0,      15)

# Following are the Auto range options
gen.add("sr300_auto_range_enable_motion_versus_range", int_t,  0,    "Enable Motion Versus Range",   1,         0,      2)
gen.add("sr300_auto_range_enable_laser",               int_t,  0,    "Enable Laser",                 1,         0,      1)

# Must be set only if sr300_auto_range_enable_motion_versus_range is set to 1
gen.add("sr300_auto_range_min_motion_versus_range",    int_t,  0,    "Min Motion Versus Range",      180,       -32767, 32767)
gen.add("sr300_auto_range_max_motion_versus_range",    int_t,  0,    "Max Motion Versus Range",      605,       -32767, 32767)
gen.add("sr300_auto_range_start_motion_versus_range",  int_t,  0,    "Start Motion Versus Range",    303,       -32767, 32767)

# Must be set only if sr300_auto_range_enable_laser is enabled
gen.add("sr300_auto_range_min_laser",                  int_t,  0,    "Min Laser",                    2,         -32767, 32767)
gen.add("sr300_auto_range_max_laser",                  int_t,  0,    "Max Laser",                    16,        -32767, 32767)
gen.add("sr300_auto_range_start_laser",                int_t,  0,    "Start Laser",                  -1,        -32767, 32767)

gen.add("sr300_auto_range_upper_threshold",            int_t,  0,    "Upper Threshold",              1250,      0,      65535)
gen.add("sr300_auto_range_lower_threshold",            int_t,  0,    "Lower Threshold",              650,       0,      65535)

# Following are the Wake up options
#gen.add("sr300_wakeup_dev_phase1_period",              int_t,  0,    "Dev Phase1 Period",            1,         0,      65535)
#gen.add("sr300_wakeup_dev_phase1_fps",                 int_t,  0,    "Dev Phase1 Fps",               1,         0,      3)
#gen.add("sr300_wakeup_dev_phase2_period",              int_t,  0,    "Dev Phase2 Period",            1,         0,      65535)
#gen.add("sr300_wakeup_dev_phase2_fps",                 int_t,  0,    "Dev Phase2 Fps",               1,         0,      3)
#gen.add("sr300_wakeup_dev_reset",                      int_t,  0,    "Dev Reset",                    0,         0,      0)
#gen.add("sr300_wake_on_usb_reason",                    int_t,  0,    "Wake On Usb Reason",           1,         0,      3)
#gen.add("sr300_wake_on_usb_confidence",                int_t,  0,    "Wake On Usb Confidence" ,      1,         0,      100)

exit(gen.generate(PACKAGE, "realsense_camera", "sr300_params"))
